package com.lee.boot.head.first.demo.util.ThreadPoolUtils;

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author: Lee
 * @Date: 2018/12/27 18:03
 * @Description:
 */
@Component
public class ThreadPoolUtil {

    @Resource(name = "getDefaultPool")
    private ThreadPoolTaskExecutor executor;

    public void goGoGo() {
        executor.submit(() -> System.out.println("aaaaaaa"));
    }

}
